package com.wuliu.system.domain.dto;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@ApiModel(value = "BaseDto对象", description = "分页参数类")
public class BaseDto {
    @ApiModelProperty(value = "当前页码")
    protected Integer pageNum;
    @ApiModelProperty(value = "每页记录数")
    protected Integer pageSize;

    public Integer getPageNum() {
        return pageNum == 0 ? 1 : pageNum;
    }

    public void setPageNum(Integer pageNum) {
        if (pageNum != null) {
            this.pageNum = pageNum;
        }
    }

    public Integer getPageSize() {
        return pageSize == 0 ? 10 : pageSize;
    }

    public void setPageSize(Integer pageSize) {
        if (pageSize != null) {
            this.pageSize = pageSize;
        }
    }
}
